Lasso Capture AE is a control panel which, when open, intercepts all Apple Events sent on the local system. It will print the events in a string which can be used in Lasso format files with the [event: ...] tag.
To install Lasso Capture AE, place it in your Control Panels folder and restart.
The [event: ...] tag is used to send Apple Events from Lasso. This tag requires that the events be expressed in a specially formatted string. Lasso Capture AE makes it easy to create and use even complex Apple Event strings. Simply open the Lasso Capture AE control panel and send the events you want to use from your script editor.
For example:
• To have the Finder return the number of open windows on the server:
Run in script editor:
tell application "Finder"
count of every window
end tell
Lasso Capture AE will print out this string:
[event: target="Finder", class=core, id=cnte]
'----':'null'(), kocl:type(cwin), &subj:'null'()
[/event]
This can be pasted directly into a Lasso format file.
To access the result of this event use the [event_result] tag.
• To have the Finder return a list of the names of the open windows, run the following in your script editor:
This can also be directly pasted into a Lasso format file and the result is accessed using the [event_result] tag with a numeric parameter indicating the index of the window name to return.
[event_result: 1] will print out the first window name.